﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;

namespace HoldemManagerDAL
{
    /// <summary>
    /// Classe containing the context to the Holdem_Manager Database connection using the Entity Framework
    /// </summary>
    public partial class EFEntity
    {
        /// <summary>
        /// Private variable
        /// </summary>
        
        
        private HM_EntityEntities entity;
        public EFEntity()
        {
            //initialisation of the context
            entity = new HM_EntityEntities();

            //initialisung teh Automapping
            AutoMapperInitialise();
        }

        //initialising the differents mapping between EntityFramework and Specific DTO DTO
        private void AutoMapperInitialise()
        {

            Mapper.CreateMap<players, DTO.players>();            //the players
            Mapper.CreateMap<pokersites, DTO.pokersites>();     //the sites
            Mapper.CreateMap<tables, DTO.tables>();     //les tables


        }

      
    }
}
